/**
 * related to listCellTemplate.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-07-13
 */
var page = sm("do_Page");
var nf = sm("do_Notification");
var button1 = ui("do_Button_1");
var root = ui("$");//$是这个ui文件根节点组件的通配符，如果指定组件的id，也可以用id来获取对象
var qqHttp = require("helper/http");
var userUrl = require("url/user");
var delUrl = userUrl.url.bank.del;
root.setMapping({
	"do_Button_1.tag" : "id"
});
//删除
button1.on("touch",function(){
	nf.confirm({text:"是否确认删除?",title:"提示",button1text:"确定",button2text:"取消"},function(datacall,e){
		if(datacall == 1){
			var params = {
				id: button1.tag
			};
			qqHttp.post(delUrl, params, function(data) {
				nf.toast("删除成功");
				page.fire("deleteBank",button1.tag);
			})
		}
	});
});